/**
* @author Ashish Gupta
* CVSSP, University of Surrey
* Copyright (c) 2010 Ashish Gupta
* All rights reserved.
*/
/**
 * 
 */
package image;

import java.io.BufferedReader;
import java.io.File;
import java.io.FileReader;
import java.io.IOException;
import java.util.ArrayList;

/**
 * @author Ashish
 *
 */
public class ImageList {
	private ArrayList<String> imageNames = new ArrayList<String>();
	private ArrayList<Double>classLabels = new ArrayList<Double>();
	
	public ImageList(String fileURI) throws IOException{
		File file = new File(fileURI);
		FileReader fr = new FileReader(file);
		BufferedReader br = new BufferedReader(fr);
		String line = null;
		while((line = br.readLine())!= null){
			String[] inLine = line.split("\t");
			this.imageNames.add(inLine[0]);
			this.classLabels.add(Double.parseDouble(inLine[1]));
		}
		br.close();
		fr.close();
	}

	/**
	 * @return the imageNames
	 */
	public ArrayList<String> getImageNames() {
		return imageNames;
	}

	/**
	 * @return the classLabels
	 */
	public ArrayList<Double> getClassLabels() {
		return classLabels;
	}
}
